﻿@model IEnumerable<AppStore.Domain.Entities.Category>

<ul class="sidebar_list">

    @{
    int iteration = 0;    
    foreach (var item in Model)
    {
        if(iteration == 0)
        {
            <li class="first">@Html.RouteLink(item.name, new {controller = "Application", Action = "Browse" , category = item.name})</li>
        }
        else if(iteration == Model.Count())
        {
            <li class="last">@Html.RouteLink(item.name, new {controller = "Application", Action = "Browse" , category = item.name})</li>
        }
        else
        {
            <li>@Html.RouteLink(item.name, new {controller = "Application", Action = "Browse" , category = item.name})</li>
        }
        
        iteration++;
    }
    }

</ul>